<div class="fsh-pop">
    <div id="add_form" class="layui-form" lay-filter="add_form">
        <input type="hidden" id="user_id" name="user_id"/>
        <input type="hidden" id="schoolCode" name="schoolCode"/>
        <input type="hidden" id="squadCode" name="squadCode"/>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label"> </label>
                <div class="layui-input-block">
                    <div class="layui-upload">
<!--                        <button type="button" class="layui-btn" id="upload_header">上传头像</button>-->
                        <div class="layui-upload-list">
                            <img class="layui-upload-img" id="img"
                                 src="<%=photo||'http://file.sxycy.cn:8888/group1/M00/00/1B/wKgBBV05LLCAVZsyAAJHWcI4ncE40.jpeg'%>">
                            <input type="hidden" name="photo" id="imgUrl"
                                   value="<%=photo||'http://file.sxycy.cn:8888/group1/M00/00/1B/wKgBBV05LLCAVZsyAAJHWcI4ncE40.jpeg'%>"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <div class="layui-inline">
                <label class="layui-form-label"><i>*</i>姓名</label>
                <div class="layui-input-block">
                    <input name="nickname" maxlength="20" lay-verify="required" placeholder="请输入内容" class="layui-input">
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label"><i>*</i>性别</label>
                <div class="layui-input-block">
                    <input type="radio" class="layui-input-inline" name="sex" value="1" title="男" checked="checked"/>
                    <input type="radio" class="layui-input-inline" name="sex" value="0" title="女"/>
                </div>
            </div>
        </div>

        <!--        <div class="layui-form-item layui-form-text">-->
        <!--            <label class="layui-form-label"><i>*</i>职位</label>-->
        <!--            <div class="layui-input-block">-->
        <!--                <input name="job" maxlength="20" lay-verify="required" placeholder="请输入内容" class="layui-input">-->
        <!--            </div>-->
        <!--        </div>-->
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><i>*</i>电话</label>
            <div class="layui-input-block">
                <input name="phone" maxlength="20" placeholder="请输入内容" class="layui-input" lay-verify="phone|required"
                       >
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><i>*</i>邮箱</label>
            <div class="layui-input-block">
                <input name="email" maxlength="20" placeholder="请输入内容" class="layui-input" lay-verify="email|required"
                       >
            </div>
        </div>
    </div>

</div>
<style type="text/css">
    #img {
        width: 100px;
        height: 100px;
        border: 1px solid #e3e3e3;
    }
</style>
<script type="text/javascript">
    layui.use(['upload', 'form'], function () {
        var upload = layui.upload;
        var form = layui.form;
        _uploadFile({id: 'img'});
        var originData = JSON.parse($('<div>').html('<%=$data%>').text());
        if(originData){
            form.val('add_form', originData);
        }
    });

</script>
